<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%-- 
    Document   : index
    Created on : Oct 2, 2012, 6:40:48 PM
    Author     : Riso-Desktop
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>NaPredaj.sk</title>
        <link
            href="css/jquery-ui.css"
            rel="stylesheet" type="text/css" />
        
        <script src="http://code.jquery.com/jquery-1.7.js"
        type="text/javascript"></script>
        <script
            src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"
        type="text/javascript"></script>
        

            <script type="text/javascript">
                $(document).ready(function() {
                    $("input#name_hladaj").autocomplete({
                        width: 300,
                        max: 10,
                        delay: 20,
                        minLength: 3,
                        autoFocus: true,
                        cacheLength: 1,
                        scroll: true,
                        highlight: false,
                        source: function(request, response) {
                            $.ajax({
                                url: "AutoCompleteName",
                                dataType: "json",
                                data: request,
                                success: function( data, textStatus, jqXHR) {
                                    console.log( data);
                                    var items = data;
                                    response(items);
                                },
                                error: function(jqXHR, textStatus, errorThrown){
                                    console.log( textStatus);
                                }
                            });
                        }
 
                    });
                });
    
            </script>

           
        <link rel="stylesheet" href="css/style.css"/>
        <link rel="stylesheet" href="css/style2.css"/>

    </head>

    <body  style="background-image:url(img/background.png); background-repeat: no-repeat; background-position: center; background-position: top; 
           background-attachment: fixed" >
        <%if(session.getAttribute("pocet_poloziek")==null){
            session.setAttribute("pocet_poloziek", 10);
            }
        %>


        <div align="center" >
            <a href="" style="color: #333"></a>

            <table class="tabulka" width="1000" border="0" cellpadding="0" cellspacing="5">
                <tr style="height: 200px">
                    <td width="200" colspan="2">

                    </td>
                    <td width="200" >
                        <jsp:include page="user_panel.jsp"></jsp:include>
                    </td>
                </tr>
                <tr >
                    <td style="vertical-align: top;" width="200"  >
                        <jsp:include page="menu"></jsp:include>
                    </td>
                    <td style="vertical-align: top;">
                        <jsp:include page="vlozInzerat"></jsp:include>               

                    </td>
                    <td width="200" style="vertical-align: top">
                        <a href="vlozInzerat" target="iframe_hlavny" >Vložiť inzerát</a>
                        <div class="vyhladavanie">
                            <br/>
                            Vyhľadávanie:
                            <br/>
                            <form method="Post" action="vyhladaj" target="iframe_hlavny">
                                <input id="name_hladaj" name="name_hladaj" type="text" /> 
                                <input type="submit" value="Vyhľadaj"/>
                            </form>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        3
                    </td>
                    <td>4
                    </td>
                    <td width="200">
                        5
                    </td>
                </tr>
            </table>


        </div>
        
    </body>
</html>
 